package com.gton;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @description: 网关启动类
 * @author: GuoTong
 * @createTime: 2022-11-12 19:18
 * @since JDK 1.8 OR 11
 **/
@SpringBootApplication
@EnableDiscoveryClient
public class GatewayMain {


    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }


    public static void main(String[] args) {

        SpringApplication.run(GatewayMain.class, args);
    }
}
